package entity

type UserRecord struct {
	Id          int64  `gorm:"column:id;primary_key" json:"id"`
	UserId      string `gorm:"column:user_id;type:varchar(32);not null" json:"user_id"`
	CustomData  string `gorm:"column:custom_data;type:varchar(255);not null" json:"custom_data"`
	UnlockNum   int    `gorm:"column:unlock_num;type:integer;not null" json:"unlock_num"`
	Supervisor  int    `gorm:"column:supervisor;type:integer;not null" json:"supervisor"`
	NickName    string `gorm:"column:nick_name;type:varchar(64);not null" json:"nick_name"`
	WxwebOpenid string `gorm:"column:wxweb_openid;type:varchar(64);not null" json:"wxweb_openid"`

	Phone         string  `gorm:"column:phone;type:varchar(32);not null" json:"phone"`
	Avatar        string  `gorm:"column:avatar;type:varchar(255);not null" json:"avatar"`
	UserMoney     float64 `gorm:"column:user_money;type:double;not null" json:"user_money"`
	WithdrawMoney float64 `gorm:"column:withdraw_money;type:double;not null" json:"withdraw_money"`
	CreatedAt     int64   `gorm:"column:created_at;type:bigint;not null" json:"created_at"`
	UpdatedAt     int64   `gorm:"column:updated_at;type:bigint;not null" json:"updated_at"`
}

func (u *UserRecord) TableName() string {
	return "user_records"
}
